package com.mytest.vo;


public enum ResultCode implements IResultCode {
    SUCCESS(200, "操作成功"),
    FAILURE(400, "业务异常"),
    UN_AUTH(401, "未认证"),
    NOT_FOUND(404, "服务未找到"),
    ERROR(500, "服务异常"),
    TOO_MANY_REQUESTS(429, "请求频繁,请稍后再试!"),
    GLOBAL_PARAM_ERROR(4000, "参数错误"),
    CURRENT_USER_FAIL(10001, "获取当前用户失败"),
    USER_NEED_LOGIN(11001, "用户未登录，请登陆后进行访问"),
    USER_MAX_LOGIN(11002, "该用户已在其它地方登录"),
    USER_LOGIN_TIMEOUT(11003, "长时间未操作，自动退出"),
    USER_DISABLED(11004, "用户被禁用"),
    USER_LOCKED(11005, "用户被锁定"),
    USER_PASSWORD_ERROR(11006, "用户名或密码错误"),
    USER_PASSWORD_EXPIRED(11007, "用户密码过期"),
    USER_ACCOUNT_EXPIRED(11008, "用户账号过期"),
    USER_NOT_EXIST(11009, "没有该用户"),
    USER_LOGIN_FAIL(11010, "用户登录失败"),
    VERIFY_CODE_ERROR(11011, "验证码错误"),
    USER_IS_EXIST(11012, "用户已存在");

    final int code;
    final String msg;

    public int getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }

    private ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}

